// 引入请求js
import config from '@/utils/http/http.js';
// 登录接口统一管理
const $goods = {
	
	// 秒杀商品
	get_promotion_list: function(data, methods) {
		return config.httpRequest({
			url: 'Goods/promotion_list',
			data,
			methods
		})
	},
	
	// 获取商品顶级分类
	get_cat_list: function(data, methods) {
		return config.httpRequest({
			url: 'Categories/getTopCat',
			data,
			methods
		})
	},
	
	// 获取顶级分类下的子分类
	get_cat_child: function(data, methods) {
		return config.httpRequest({
			url: 'Categories/getChildCat',
			data,
			methods
		})
	},
	
	// 今日上新
	get_new_goods: function(data, methods) {
		return config.httpRequest({
			url: 'Goods/new_goods',
			data,
			methods
		})
	},
	
	// 推荐商品
	get_pick_goods: function(data, methods) {
		return config.httpRequest({
			url: 'Goods/getPickGoods',
			data,
			methods
		})
	},
	
	// 商品详情
	get_goods_detail: function(data, methods) {
		return config.httpRequest({
			url: 'Goods/getDetial',
			data,
			methods
		})
	},
	
	// 查看优惠券
	get_coupon_list: function(data, methods) {
		return config.httpRequest({
			url: 'Coupon/couponList',
			data,
			methods
		})
	},

}
export default $goods;
